package com.chenyongjing.design.pattern.observer.guava;

import com.google.common.eventbus.EventBus;

/**
 * @Author chen
 * @Date 2022/12/5 21:52
 */
public class Test {
    public static void main(String[] args) {
        // 消息总线
        EventBus eventBus = new EventBus();
        PojoEvent pojoEvent = new PojoEvent();
        // 将事件注册到消息总线中
        eventBus.register(pojoEvent);
        eventBus.post(new Pojo("jojo"));
    }
}
